package com.lagou.edu.dao;

import com.lagou.edu.pojo.LagouAuthCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author wyx
 * @Date 2020/5/5 23:49
 */
public interface LagouAuthCodeDao extends JpaRepository<LagouAuthCode,Long> {

    @Query(value = "select * from lagou_auth_code  where email=?1 order by createtime desc",nativeQuery = true)
    public List<LagouAuthCode> findAuthCodeByEmail(String email);
}
